using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static UnityEngine.GraphicsBuffer;

public class CameraFollow : MonoBehaviour
{
    public Transform target;
    [SerializeField] Vector2 offset;
    // Start is called before the first frame update
    void Start()
    {
        
    }

// Update is called once per frame
void Update()
{
        Vector2 targetposition = new Vector2(target.position.x, target.position.y);
        Vector2 desiredPosition = targetposition + offset;
        transform.position = new Vector3(desiredPosition.x,desiredPosition.y,-10);
    }
}
